<%@page import="com.winexpress.support.Enquiry"%>
<%@page import="java.util.List"%>
<%@page import="com.winexpress.util.SessionAttributes"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>wineXpress online shop</title>      
    </head>
    <body>
        <t:customerNavigation/>
        <br/>
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">Pending Enquiry</h1>
                    <ol class="breadcrumb">
                        <li><a href="/WineXpressClient/index.jsp">Home</a></li>
                        <li><class="active">Pending Enquiry</li>
                    </ol>
                </div>
            </div>
            <div class="panel panel-default" style="width:70%; margin-left: 15%; margin-top: 10px" >
                <div class="panel-heading">
                    <h3 class="panel-title">Pending Enquiry</h3>
                </div>
                <div class="panel-body">
                    <table class="table table-bordered" >
                        <thead>
                            <tr>
                                <th>Enquiry ID</th>   
                                <th>Subject </th>  
                                <th>Category </th>
                                <th></th>      
                            </tr>
                        </thead>
                        <tbody>
                            <%  List<Enquiry> list = (List) request.getAttribute("customerEnquiryList");%>
                            <% if (!list.isEmpty()) {
                                    for (Object o : list) {
                                        Enquiry c = (Enquiry) o;%>
                            <tr>
                                <td style="vertical-align: middle;"><%=c.getId()%></td>      
                                <td style="vertical-align: middle;"><%=c.getSubject()%></td>
                                <td style="vertical-align: middle;"><%=c.getCategory()%></td>
                                <td style="vertical-align: middle;">
                                    <form class="form-horizontal" role="form" id="viewEnquiry"  name="viewEnquiry" action="/WineXpressClient/enquiryManagement/customerViewDetailedEnquiryPending" method="post"> 
                                        <center><button type="submit" class="btn btn-default" >View</button></center>
                                        <input name="viewID" id="viewID" type="hidden" value="<%=c.getId()%>"/>
                                    </form>
                                </td>
                            </tr>   
                            <%}
                            } else {%>
                            <tr>No more pending enquiry.</tr>
                            <%}%>
                        </tbody>
                    </table> 
                </div>
            </div>
        </div>
        <t:footer/>
    </body>
</html>




